<?php
/**
 * Description of MemoryStatHelper
 * provide memory consumption stat
 *
 * @author ben
 */
class MemoryStatHelper
{
    /**
     * output current memory consumption stat
     *
     * @param mixed $in
     * @return false|mixed the result encoded
     */
    public static function getStat($msg)
    {
        $output = str_repeat("-=", 25)."\n";
        $output .= "{$msg}, memory usage: ".var_export(number_format(memory_get_peak_usage()), true)." bytes\n";
        return $output;
    }
}
